package crm.model.teacherPC.net.job;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

import crm.model.NetConst;

public class ScreenLockJob implements Job {
	boolean unlock;
	public ScreenLockJob(boolean unlock){
		this.unlock = unlock;
	}
	
	public Object doing(ObjectInputStream is, ObjectOutputStream os) {
		if (!unlock){
			try{
				os.writeObject(NetConst.SCREENLOCK);
			}catch (IOException e){
				e.printStackTrace();
			}
		}else{
			try{
				os.writeObject(NetConst.SCREENUNLOCK);
			}catch (IOException e){
				e.printStackTrace();
			}
		}
		return null;
	}

}
